package com.itheima.model.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
public class PageResultM extends PageResult {


    public PageResultM(Integer page,Integer pagesize,
                      int counts,List list,List totals) {
        super.page = page;
        super.pagesize = pagesize;
        super.items = list;
        super.counts = counts;
        super.pages = counts % pagesize == 0 ? counts / pagesize : counts / pagesize + 1;
        this.totals = totals;
    }
}
